Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow video inference fps value to pass through to API #205

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

capjamesg
Copy link
Collaborator

Description

This PR updates the video inference API wrappers in the roboflow package to adhere to the fps that the user passes.

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested, please provide a testcase or example of how you tested the change?

This change can be tested using the following code:

from roboflow import Roboflow

rf = Roboflow(api_key="API_KEY")
project = rf.workspace().project("logistics-sz9jr")
model = project.version(2).model

job_id, signed_url = model.predict_video(
    "video.mp4",
    fps=1,
    prediction_type="batch-video",
)

results = model.poll_until_video_results(job_id)

print(results)

job_id, signed_url = model.predict_video(
    "video.mp4",
    fps=5,
    prediction_type="batch-video",
)

results = model.poll_until_video_results(job_id)

print(results)

And ensuring that the FPS intervals are 1 FPS for the first video and 5 fps for the second video.

Any specific deployment considerations

N/A

Docs

N/A

@capjamesg capjamesg self-assigned this Dec 1, 2023
Copy link
Contributor

@bigbitbus bigbitbus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@capjamesg capjamesg merged commit 804f60e into main Dec 1, 2023
2 checks passed
@capjamesg capjamesg mentioned this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants